package org.rcloud.io.controller;

import io.swagger.annotations.ApiOperation;
import org.rcloud.io.Utils.ResultVo;
import org.rcloud.io.model.SpecialtyMapping;
import org.rcloud.io.service.SpecialtyMappingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/specialty")
public class SpecialtyMappingController {

    @Autowired
    private SpecialtyMappingService sms;

    @ApiOperation(value = "添加销售点、特产关联", notes = "添加销售点、特产关联")
    @ResponseBody
    @RequestMapping(value = "/save", produces = {"application/json;charset=UTF-8"})
    public ResultVo findByEid(Integer bId, Integer sId) {
        SpecialtyMapping articleTable011Mapping = new SpecialtyMapping();
        articleTable011Mapping.setbId(bId);
        articleTable011Mapping.setsId(sId);
        return sms.save(articleTable011Mapping);
    }
}
